<!--主页头部组件-->
<template lang="html">
    <div class="main-header">
        <div class="backbg-color">
            <div class="col-lg-12 col-md-12 col-sm-12" style="height: 50px">
                <div style="float:right;" id="logind">
                    <a href="/rigister" class="font-white">注册</a>
                    <a href="/login" class="font-white">登陆</a>
                </div>
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12">
                <div class="col-lg-1 col-md-1 col-sm-1"></div>
                <div class="col-lg-10 col-md-10 col-sm-11" style="height:80px;border: solid 1px #fafafa;background: white">
                    <div class="col-lg-2 col-md-4 main-logo">
                        <span class="main-logo-dream">梦想</span>改造家
                    </div>
                    <div class="col-lg-5 col-md-5 main-menu-big"></div>
                    <div class="col-lg-1 col-md-1 col-sm-1 main-menu-big left-0">
                        <a href="#">首页</a>
                    </div>
                    <div class="col-lg-1 col-md-1 col-sm-1 main-menu-big left-0">
                        <a href="/fitment_company">装修公司</a>
                    </div>
                    <div class="col-lg-1 col-md-1 col-sm-1 main-menu-big left-0">
                        <a href="/fitment_advisor">装修顾问</a>
                    </div>
                    <div class="col-lg-1 col-md-1 col-sm-1 main-menu-big left-0">
                        <a href="/furniture_mall">家具商城</a>
                    </div>

                    <div class="col-lg-1 col-md-1 col-sm-1 main-menu-big left-0">
                        <a href="/user_center">个人中心</a>
                    </div>

                    <div class="col-lg-4 col-md-7 text-right main-menu-sm">
                        <a id="show_menu" v-on:click="showMenu"><span class="glyphicon glyphicon-align-justify"></span></a>
                    </div>
                </div>
            </div>

            <div class="col-lg-12 col-md-12 col-sm-12" style="z-index: 999;">
                <div class="col-lg-1 col-md-1 col-sm-1"></div>
                <div class="col-lg-10 col-md-10 col-sm-11" id="menu_sm" style="background: white;border: solid 1px #bcbcbc;display: none">
                    <h4 style="color: #8f8f8f;"><a href="#">首页</a></h4>
                    <h4 style="color: #8f8f8f;"><a href="/fitment_company">装修公司</a></h4>
                    <h4 style="color: #8f8f8f;"><a href="/fitment_advisor">装修顾问</a></h4>
                    <h4 style="color: #8f8f8f;"><a href="/furniture_mall">家具商城</a></h4>
                    <h4 style="color: #8f8f8f;"><a href="/user_center">个人中心</a></h4>
                </div>
            </div>

            <div class="col-lg-12 col-md-12 col-sm-12" style="height: 180px"></div>
            <div class="col-lg-12 col-md-12 col-sm-12 text-center font-white size4">
                免费设计
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12" style="height: 20px"></div>
            <div class="col-lg-12 col-md-12 col-sm-12">
                <div class="col-lg-3 col-md-3 col-sm-3"></div>
                <div class="col-lg-6 col-md-6 col-sm-6">
                    <input type="text" class="apply-text" placeholder="您的称呼">
                    <div class="col-lg-12 col-md-12 col-sm-12" style="height: 20px"></div>
                    <input type="text" class="apply-text" placeholder="电话号码">
                    <div class="col-lg-12 col-md-12 col-sm-12" style="height: 30px"></div>
                    <input @click="apply" type="button" class="apply-btn" value="立即申请">
                </div>
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12" style="height: 40px"></div>
        </div>
    </div>
</template>

<style>
    .left-0{
        padding-left: 0
    }
</style>
<script>
    import menus from './menu.vue'
    import cook from '../../../../tools/cookies'
    export default{
        data(){
            return{
                msg:'hello vue'
            }
        },
        components:{
            menus
        },
        mounted(){
            if(sessionStorage.getItem('user')){
                $('#logind').hide();
            }else{
                $('#logind').show();
            }
        },
        methods: {
            showMenu: function(){
                $('#menu_sm').toggle(500);
            },
            apply: function(){
                alert('申请成功，请耐心等待客服联系！')
            }
        }
    }
</script>
